#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <CUnit/Basic.h>

inline int max(int a, int b)
{
	return a>b? a: b;
}

static int init()
{
	return 0;
}

static int cleanup()
{
	return 0;
}

static void test_max()
{
	CU_ASSERT_EQUAL(3, max(1, 3));
	CU_ASSERT_NOT_EQUAL(1, max(1, 3));
}

void utest()
{
	CU_initialize_registry();

	CU_pSuite suite1 = CU_add_suite("my suite1", init, cleanup);
	CU_add_test(suite1, "max", test_max);

	CU_basic_set_mode(CU_BRM_VERBOSE);
	CU_basic_run_tests();

	CU_cleanup_registry();
}

int main(int argc, char **argv)
{
	utest();
	return 0;
}
